<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Aikes_系统</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<script type="text/javascript" src="css/js/jquery.min.js"></script>
<script type="text/javascript" src="css/js/emp.js"></script>
<script type="text/javascript" src="css/js/emp_add.js"></script>
<script type="text/javascript" src="css/js/emp_mod.js"></script>
<script type="text/javascript">
	var deptId;
	$(function(){
		$("#navigation li a").eq(1).addClass("active");
		deptId = <%=request.getParameter("deptId")	%>
		if(deptId == null){
			deptId = "";
		}
		empPage(1);
	});
	function empAdd(){
		$("#emp_list").hide();
		$("#emp_add").fadeIn();
	}
</script>
</head>
<body>
<div id="header">
		<div class="shell">
			<div id="top">
				<c:import url="../logo.jsp"></c:import>
			</div>
			<div id="navigation" style="padding-bottom:150px;">
				<c:import url="../menu.jsp"></c:import>
			</div>
		</div>
</div>
	<!-- Container -->
	<div id="container" >
		<!-- Content -->
		<div id="main" style="margin-left:290px;">
		  <div class="cl">&nbsp;</div>	
			<div id="content">	
				<div id="emp_list" class="box" style="width: 750px; display:block;" >
					<div class="box-head">
						<h2 class="left">员工管理</h2>
						<div>
							<input type="button" class="field right" value ="按名字查询" 
							style="margin-top:4.5px;height:23px;cursor:pointer" onclick="searchName();"/>
							<span class=" right" >&nbsp;</span>
							<input	type="text" id="search" class="field size3 right" style="margin-top:5px;height:10px;"/>
						</div>
					</div>
					<div class="table" id="emp_table">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<thead >
							<tr class="index_tr">
								<th width="5%;">ID</th>
								<th width="13%;">姓名</th>
								<th width="10%;">性别</th>
								<th width="10%;">年龄</th>
								<th width="13%;">部门名</th>
								<th width="10%;">职位</th>
								<th width="15%;">入职时间</th>
								<th width="10%;"></th>
								<th width="10%;"></th>
							</tr>
						</thead>
						<tbody id="emp_tbody">
							
						</tbody>
					</table>
					<p id="emp_error" style="font-size:12px; font-weight:bold;display:none;
					padding-top:8px;margin:0 280px; width:100%;">权限不够!</p>
					<!-- Pagging -->
					<div class="pagging">
						<div id = "emp_page" class="left" style = "padding:0 75px;">
			                 	
						</div>
						<div class = "right" style="padding-right: 30px;">
							<a href="javascript:empAdd();" style="color:#666;">添加</a>
						</div>
					</div>
					<!-- End Pagging -->
				</div>
			</div>
		</div>
	<div class="cl">&nbsp;</div>			
</div>
<!-- save -->
			<div class="box" id="emp_add" style="width:450px;margin-left:400px;display:none;">
				<div class="box-head">
					<span class="icon"> <i class="icon-align-justify"></i>
					</span>
					<h2>添加员工</h2>
				</div>
				<form  class="form" style="padding:15px 10px 5px 55px;width:400px;">
					<p>
						<span class="inline-field">姓名：</span>
						<input	type="text" id="empName" class="field size2" />
					</p>
					<p>
						<span class="inline-field">性别：</span> 
						<input	type="text" id="empSex" class="field size2" />
					</p>
					<p>
						<span class="inline-field">年龄：</span> 
						<input	type="text" id="empAge" class="field size2" />
					</p>
					<p>
						<span class="inline-field">职位：</span> 
						<input	type="text" id="empJob" class="field size2" />
					</p>
					<p>
						<span class="inline-field">部门：</span> 
						<input	type="text" id="empDept" class="field size2" />
					</p>
					<div class="buttons" style="width:310px;">
						<span id="emp_add_error" class="left"></span>
						<input type="button" class="button" value="返回" onclick="empBack()"/>
						<input type="button" id="save" class="button" value="保存" onclick="empSave()"/>
					</div>
				</form>
			</div>
		<!-- save -->
		<!-- modify -->
			<div class="box" id="emp_mod" style="width:450px;margin-left:400px;display:none;">
				<div class="box-head">
					<span class="icon"> <i class="icon-align-justify"></i>
					</span>
					<h2>修改信息</h2>
				</div>
				<form  class="form" style="padding:15px 10px 5px 55px;width:400px;">
					<p>
						<span class="inline-field">姓名：</span>
						<input	type="text" id="empName_mod" class="field size2" />
					</p>
					<p>
						<span class="inline-field">性别：</span> 
						<input	type="text" id="empSex_mod" class="field size2" />
					</p>
					<p>
						<span class="inline-field">年龄：</span> 
						<input	type="text" id="empAge_mod" class="field size2" />
					</p>
					<p>
						<span class="inline-field">职位：</span> 
						<input	type="text" id="empJob_mod" class="field size2" />
					</p>
					<p>
						<span class="inline-field">部门：</span> 
						<input	type="text" id="empDept_mod" class="field size2" />
					</p>
					<div class="buttons" style="width:310px;">
						<span id="emp_mod_error" class="left"></span>
						<input type="button" class="button" value="返回" onclick="empBackMod()"/>
						<input type="button" id="save" class="button" value="保存" onclick="empMod()"/>
					</div>
				</form>
			</div>
		<!-- save -->
<!-- End Content -->
</div>
	
<!-- Footer -->
<div id="footer">
	<div class="shell">
		<span class="left">&copy; 2017 - Aikesls</span>
	</div>
</div>
<!-- End Footer -->

</body>
</html>